<!DOCTYPE html>
<html lang="en">
<head>

	<meta charset="utf-8">
    <title>管理中心</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
    
    <!-- Le styles -->
    <link href="/cssadmin/bootstrap.css" rel="stylesheet">
    <link href="/cssadmin/font-awesome.css" rel="stylesheet">
    <link href="/cssadmin/admin.css" rel="stylesheet">
	<script src="/jsadmin/jquery.min.js"></script>
	<script src="/jsadmin/bootstrap.js"></script>
	<script src="/jsadmin/excanvas.min.js"></script>
	<script src="/jsadmin/jquery.flot.min.js"></script>
	<script src="/jsadmin/jquery.flot.resize.js"></script>
    
    <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
    <!--[if lt IE 9]>
	    <script src="/js/html5.js"></script>
    <![endif]-->

</head>    
<body>

<div class="container">
	<div class="row">
		<div class="span2">
			<div class="main-left-col">
				<h1><i class="icon-shopping-cart icon-large"></i> Admin</h1>
				<ul class="side-nav">

					<li class="active">
						<a href=""><i class="icon-home"></i> 管理中心</a>
					</li>
					<li class="dropdown">
						<a class="dropdown-toggle" data-toggle="collapse" data-target="#website-dropdown" href="#"><i class="icon-sitemap"></i> 商品管理 <b class="caret"></b></a>
						<ul id="website-dropdown" class="collapse">
							<li><a href="{{url('admins/glist')}}">商品列表</a></li>
							<li><a href="{{url('admins/clist')}}">商品分类</a></li>
							<li><a href="{{url('admins/gadd')}}">添加商品</a></li>
							<li><a href="{{url('admins/cadd')}}">添加分类</a></li>
						</ul>
					</li>
					<li class="dropdown">
						<a class="dropdown-toggle" data-toggle="collapse" data-target="#store-dropdown" href="#"><i class="icon-shopping-cart"></i> 订单管理 <b class="caret"></b></a>
						<ul id="store-dropdown" class="collapse">
							<li><a href="{{url('order/wf')}}">订单列表(未付款)</a></li>
							<li><a href="{{url('order/ys')}}">订单列表(已付款)</a></li>
							<li><a href="{{url('order/yf')}}">订单列表(已发货)</a></li>
							<li><a href="{{url('order/end')}}">订单列表(已完成)</a></li>
						</ul>
					</li>
					<li class="dropdown">
						<a class="dropdown-toggle" data-toggle="collapse" data-target="#reports-dropdown" href="#"><i class="icon-signal"></i> 会员管理 <b class="caret"></b></a>
						<ul id="reports-dropdown" class="collapse">
							<li><a href="report.html">会员列表</a></li>
						</ul>
					</li>
					<li class="dropdown">
						<a class="dropdown-toggle" data-toggle="collapse" data-target="#report-dropdown" href="#"><i class="icon-file"></i> 素材管理 <b class="caret"></b></a>
						<ul id="report-dropdown" class="collapse">
							<li><a href="{{url('img/list')}}">图片空间</a></li>
							<li><a href="{{url('img/up')}}">上传图片</a></li>
						</ul>
					</li>
					<li class="dropdown">
						<a class="dropdown-toggle" data-toggle="collapse" data-target="#settings-dropdown" href="#"><i class="icon-cogs"></i> 权限管理 <b class="caret"></b></a>
						<ul id="settings-dropdown" class="collapse">
							<li><a href="{{url('admins/reg')}}">添加管理员</a></li>
							<li><a href="{{url('admins/adminlist')}}">管理员列表</a></li>
							<li><a href="{{url('admins/roleadd')}}">添加角色</a></li>
							<li><a href="{{url('admins/rolelist')}}">角色列表</a></li>
						</ul>
					</li>
				</ul>
			</div> <!-- end main-left-col -->
		</div> <!-- end span2 -->
	<div class="span10">
	<div class="main-area dashboard">
		<div class="row">
			<div class="span10">
				<div class="slate clearfix">
					<a class="stat-column" href="{{url('order/yf')}}">
						<span class="number">{{$yifa->count}}</span>
						<span>已发货订单</span>
					</a>
				
					<a class="stat-column" href="{{url('order/ys')}}">
						
						<span class="number">{{$yifu->count}}</span>
						<span>未发货订单</span>
						
					</a>
				
					<a class="stat-column" href="{{url('order/wf')}}">
						
						<span class="number">{{$weifu->count}}</span>
						<span>未付款订单</span>
						
					</a>
				
					<a class="stat-column" href="{{url('order/end')}}">
						
						<span class="number">{{$end->count}}</span>
						<span>订单总数</span>
						
					</a>
				
				</div>
			
			</div>
		
		</div>
		
		<div class="row">
		
			<div class="span5">
			
				<div class="slate">
				
					<div class="page-header">
						<h2><i class="icon-signal pull-right"></i>销量走势</h2>
					</div>
					<div id="placeholder" style="height: 297px;"></div>
				
				</div>
			
			</div>
		
			<div class="span5">
			
				<div class="slate">
				
					<div class="page-header">
						<h2><i class="icon-shopping-cart pull-right"></i>最新订单</h2>
					</div>
					
					<table class="orders-table table">
					<tbody>
					@foreach($order as $o)
						<tr>
							<td><a href="{{url('order/info',['oid'=>$o->order_id])}}">{{date('m月d日',$o->xdtime)}} - {{$o->name}}</a>
								@if($o->status == 0)
									<span class="label">未付</span>
								@elseif	($o->status == 1)
									<span class="label label-success">已付款</span>
								@elseif($o->status == 2)
									<span class="label label-info">已发货</span>
								@endif
							</td>
							<td>￥{{$o->price/100}}</td>
						</tr>
					@endforeach
						<tr>
							<td colspan="2"><a href="{{url('order/wf')}}">更多订单详情</a></td>
						</tr>
					</tbody>
					</table>

				</div>
			
			</div>
		
		</div>
		
		
		
		<div class="row">
		
			<div class="span10 footer">
			
				<p>&copy; Website Name 2014</p>
			
			</div>
		
		</div>
		
	</div>
	
	</div> <!-- end span10 -->
		
	</div> <!-- end row -->
		
</div> <!-- end container -->

<!-- Le javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->

<script type="text/javascript">
$(function () {
    var d1 = [];
        d1.push([0, 32]);
        d1.push([1, 30]);
        d1.push([2, 24]);
        d1.push([3, 17]);
        d1.push([4, 11]);
        d1.push([5, 25]);
        d1.push([6, 28]);
        d1.push([7, 36]);
        d1.push([8, 44]);
        d1.push([9, 52]);
        d1.push([10, 53]);
        d1.push([11, 50]);
        d1.push([12, 45]);
        d1.push([13, 42]);
        d1.push([14, 40]);
        d1.push([15, 36]);
        d1.push([16, 34]);
        d1.push([17, 24]);
        d1.push([18, 17]);
        d1.push([19, 17]);
        d1.push([20, 20]);
        d1.push([21, 28]);
        d1.push([22, 36]);
        d1.push([24, 38]);
        d1.push([25, 38]);
        d1.push([26, 38]);
        d1.push([27, 38]);
        d1.push([28, 38]);
        d1.push([29, 38]);
        d1.push([30, 38]);

    $.plot($("#placeholder"), [ d1 ], { grid: { backgroundColor: 'white', color: '#999', borderWidth: 1, borderColor: '#DDD' }, colors: ["#FC6B0A"], series: { lines: { show: true, fill: true, fillColor: "rgba(253,108,11,0.4)" } } });
});
</script>
</body>
</html>